-- card: 2832 from stack: in -- bmap block id: 2398 -- flags: 4000 -- background id: 2693 -- name: ----- HyperTalk script ----- on calculate get char 1 of card field "EMF" if it="+" then delete char 1 of card field "EMF" end if put card field "EMF" into E get char 1 of card field "R1" if it="+" then delete char 1 of card field "R1" end if put card field "R1" into R1 put abs(R1) into R1 put R1 into card field "R1" get char 1 of card field "R2" if it="+" then delete char 1 of card field "R2" end if put card field "R2" into R2 put abs(R2) into R2 put R2 into card field "R2" get char 1 of card field "R3" if it="+" then delete char 1 of card field "R3" end if put card field "R3" into R3 put abs(R3) into R3 put R3 into card field "R3" if E=0 then send zeroall exit calculate end if if E<>0 and R1=0 then if R2=0 and R3<>0 then put 0 into card field "A3" put 0 into card field "V1" --blow up A1 and A2 put "zap" into card field "A1" put "zap" into card field "A2" end if if R3=0 and R2<>0 then put 0 into card field "A2" put 0 into card field "V1" --blow up A1 and A3 put "zap" into card field "A1" put "zap" into card field "A3" end if if R2=0 and R3=0 then put 0 into card field "V1" --blow up A1, A2, & A3 put "zap" into card field "A1" put "zap" into card field "A2" put "zap" into card field "A3" end if if R2=0 or R3=0 then exit calculate end if end if if R2=0 and R3=0 then put 0 into V1 put E/R1 into I1 put I1/2 into I2 put I2 into I3 else put R2*R3/(R2+R3) into RP put E/(R1+RP) into I1 put I1*RP into V1 if R2=0 then put I1 into I2 else put V1/R2 into I2 end if if R3=0 then put I1 into I3 else put V1/R3 into I3 end if end if set the numberFormat to "0.000" put I1 into card field "A1" put I2 into card field "A2" put I3 into card field "A3" put 1*V1 into card field "V1" end calculate on closeField set hilite of card button "S1 closed" to false set hilite of card button "S1 middle" to true set hilite of card button "S1 middle" to false set hilite of card button "S1 open" to true send zeroall end closeField on zeroall put 0 into card field "V1" put 0 into card field "A1" put 0 into card field "A2" put 0 into card field "A3" end zeroall -- part 2 (field) -- low flags: 01 -- high flags: 0002 -- rect: left=44 top=87 right=102 bottom=100 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 65535 -- font id: 3 -- text size: 10 -- style flags: 256 -- line height: 13 -- part name: A1 -- part 3 (field) -- low flags: 01 -- high flags: 0002 -- rect: left=192 top=91 right=106 bottom=254 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 65535 -- font id: 3 -- text size: 10 -- style flags: 256 -- line height: 13 -- part name: V1 -- part 4 (field) -- low flags: 01 -- high flags: 0002 -- rect: left=168 top=148 right=163 bottom=224 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 65535 -- font id: 3 -- text size: 10 -- style flags: 256 -- line height: 13 -- part name: A2 -- part 5 (field) -- low flags: 01 -- high flags: 0002 -- rect: left=168 top=217 right=232 bottom=224 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 65535 -- font id: 3 -- text size: 10 -- style flags: 256 -- line height: 13 -- part name: A3 -- part 6 (field) -- low flags: 00 -- high flags: 0000 -- rect: left=251 top=31 right=47 bottom=285 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 65535 -- font id: 3 -- text size: 10 -- style flags: 256 -- line height: 13 -- part name: R1 -- part 7 (field) -- low flags: 00 -- high flags: 0000 -- rect: left=279 top=152 right=168 bottom=313 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 65535 -- font id: 3 -- text size: 10 -- style flags: 256 -- line height: 13 -- part name: R2 -- part 9 (field) -- low flags: 00 -- high flags: 0000 -- rect: left=280 top=223 right=239 bottom=314 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 65535 -- font id: 3 -- text size: 10 -- style flags: 256 -- line height: 13 -- part name: R3 -- part 10 (field) -- low flags: 00 -- high flags: 0000 -- rect: left=187 top=23 right=39 bottom=221 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 65535 -- font id: 3 -- text size: 10 -- style flags: 256 -- line height: 13 -- part name: EMF -- part 14 (button) -- low flags: 00 -- high flags: 4001 -- rect: left=330 top=82 right=102 bottom=342 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: S1 closed ----- HyperTalk script ----- on mouseUp get hilite of card button "S1 closed" if it=true then set hilite of card button "S1 closed" to false set hilite of card button "S1 middle" to true set hilite of card button "S1 middle" to false set hilite of card button "S1 open" to true send zeroall else set hilite of card button "S1 open" to false set hilite of card button "S1 middle" to true set hilite of card button "S1 middle" to false set hilite of card button "S1 closed" to true send calculate end if end mouseUp -- part 15 (button) -- low flags: 00 -- high flags: 0001 -- rect: left=319 top=82 right=102 bottom=331 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: S1 middle ----- HyperTalk script ----- on mouseUp get hilite of card button "S1 closed" if it=true then set hilite of card button "S1 closed" to false set hilite of card button "S1 middle" to true set hilite of card button "S1 middle" to false set hilite of card button "S1 open" to true send zeroall else set hilite of card button "S1 open" to false set hilite of card button "S1 middle" to true set hilite of card button "S1 middle" to false set hilite of card button "S1 closed" to true send calculate end if end mouseUp -- part 16 (button) -- low flags: 00 -- high flags: 0001 -- rect: left=307 top=82 right=102 bottom=319 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: S1 open ----- HyperTalk script ----- on mouseUp get hilite of card button "S1 closed" if it=true then set hilite of card button "S1 closed" to false set hilite of card button "S1 middle" to true set hilite of card button "S1 middle" to false set hilite of card button "S1 open" to true send zeroall else set hilite of card button "S1 open" to false set hilite of card button "S1 middle" to true set hilite of card button "S1 middle" to false set hilite of card button "S1 closed" to true send calculate end if end mouseUp -- part 17 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=342 top=83 right=102 bottom=403 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Switch ----- HyperTalk script ----- on mouseUp get hilite of card button "S1 closed" if it=true then set hilite of card button "S1 closed" to false set hilite of card button "S1 middle" to true set hilite of card button "S1 middle" to false set hilite of card button "S1 open" to true send zeroall else set hilite of card button "S1 open" to false set hilite of card button "S1 middle" to true set hilite of card button "S1 middle" to false set hilite of card button "S1 closed" to true send calculate end if end mouseUp -- part contents for card part 10 ----- text ----- 36 -- part contents for card part 6 ----- text ----- 4 -- part contents for card part 7 ----- text ----- 12 -- part contents for card part 9 ----- text ----- 24 -- part contents for card part 2 ----- text ----- 3.000 -- part contents for card part 4 ----- text ----- 2.000 -- part contents for card part 5 ----- text ----- 1.000 -- part contents for card part 3 ----- text ----- 24.000 -- part contents for background part 8 ----- text ----- C4. Series-Parallel